package cn.nawang.ebeim.client.version;

/**
 * Created by GanJc on 2016/1/29.
 */
public class IdentityGenerator {

    private volatile long id = System.currentTimeMillis();

    private static final IdentityGenerator generator = new IdentityGenerator();

    private synchronized long next() {
        return id++;
    }

    public static long nextId() {
        return generator.next();
    }

}
